import turtle,time
a=turtle.Turtle()
b=turtle.Turtle()
colors= ["#FF00FF", "#D8BFD8", "#0000FF", "#6495ED", "#FFD700", "#DAA520", "#FF4500"]
a.speed(20)
a.shape("turtle")
size_of_pen=40
heading_angle=0
R=300
for i in range(400):
    heading_angle+=4
    turtle.tracer(False)
    a.clear()
    a.penup()
    a.goto(0,0)
    a.setheading(heading_angle)
    a.forward(R)
    a.left(90)
    a.pensize(size_of_pen)
    a.pendown()
    for c in colors:
        a.color(c)
        a.circle(R,360/len(colors))

    a.color(colors[0])
    a.circle(R,0.01)
    turtle.tracer(True)
    time.sleep(0.017)

#定义一个画五角星闪烁的函数


# b.pen(fillcolor="yellow",pencolor='black',pensize=2)
# b.begin_fill()
# js=0
# while js<5:
#     b.forward(200)
#
#     b.right(144)
#     js=js+1
# b.end_fill()
# heading_angle1=0
# # for i in range(400):
#     heading_angle+=4
#     b.setheading(heading_angle)
#     b.pensize(5)
#     colors= ["#FF00FF", "#D8BFD8", "#0000FF", "#6495ED", "#FFD700", "#DAA520", "#FF4500"]
#     for c in colors:
#         b.color(c)
#         b.circle(100, 360 / len(colors))
#
# b.done()
turtle.done()